package com.one.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.one.dao.StuUserDao;
import com.one.entity.Order;
import com.one.entity.StuUser;
import com.one.entity.Student;
import com.one.service.StuUserService;

/**
 * @类描述：业务层实现类
 * @作者：李松
 * @创建时间：2019年4月27日
 * @项目名称：one_upbringcom.one.service.impl
 */
@Service
public class StuUserServiceImpl implements StuUserService {
	@Resource
	private StuUserDao stuUserdao;
	/**
	 * 登录
	 */
	@Override
	public Map<String, Object> finStu(String stuUser, String stuPassword) {
		
		return stuUserdao.finStu(stuUser, stuPassword);
	}
	/**
	 * 注册
	 */
	@Override
	public void addStu(StuUser stuUser) {
		stuUserdao.addStu(stuUser);
	}
	/**
	 * 查询一个
	 */
	@Override
	public List<StuUser> findOneStuUser(String stuUserName) {
		// TODO Auto-generated method stub
		return stuUserdao.findOneStuUser(stuUserName);
	}
	/**
	 * 修改资料
	 */
	@Override
	public void upStuUser(StuUser stuUser) {
		// TODO Auto-generated method stub
		stuUserdao.upStuUser(stuUser);
	}
	/**
	 * 请家教
	 */
	@Override
	public void askTea(Student student) {
		// TODO Auto-generated method stub
		stuUserdao.askTea(student);
	}
	/**
	 * 查询一个学生后去请家教
	 */
	@Override
	public List<Student> allStudent(Integer userId) {
		// TODO Auto-generated method stub
		return stuUserdao.allStudent(userId);
	}
	//添加学生
	@Override
	public void addStudent(Student student) {
		// TODO Auto-generated method stub
		stuUserdao.addStudent(student);
	}
	//添加订单
	@Override
	public void addOrder(Order order) {
		// TODO Auto-generated method stub
		stuUserdao.addOrder(order);
	}

}
